package dsk.demo.miaosha.demo.controller;

import dsk.demo.miaosha.demo.rabbitmq.MQSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/mq")
public class RabbitMqController {

    @Autowired
    MQSender mqSender;

    @ResponseBody
    @RequestMapping("/send")
    public String sendMsg(){
        mqSender.send("hello word");
        return "";
    }
}
